// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1

Item {
    id: type_choose
    width: 400
    height: 500

    signal drive_type(string typecode, string typename);

    Rectangle {
        id: rectangle_bg
        color: "#000000"
        opacity: 0.600
        anchors.fill: parent

        MouseArea
        {
            anchors.fill: parent
            onClicked: {}
        }
    }

    ListView {
        id: list_view1
        x: 37
        y: 170
        width: 326
        height: 382
        clip: true
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        spacing: 5
        delegate: Item {
            x: 5
            height: text_type.paintedHeight + 5
            width: parent.width

            MouseArea
            {
                anchors.fill: parent

                onClicked:
                {
                    drive_type(typecode, name);
                }
            }

//            Row {
//                id: row1
//                spacing: 10

            Text {
                id: text_type
                text: name
                width: list_view1.width
                anchors.verticalCenter: parent.verticalCenter
                font.bold: true
                color: "white"
                font.pixelSize: 22
                wrapMode: Text.WrapAtWordBoundaryOrAnywhere
            }
//            }
        }
        model: ListModel {
            ListElement {
                name: "速度优先（时间）"
                typecode: "0"
            }

            ListElement {
                name: "费用优先（不走收费路段最快道路）"
                typecode: "1"
            }

            ListElement {
                name: "距离优先"
                typecode: "2"
            }

            ListElement {
                name: "不走快速路（不包含高速路）"
                typecode: "3"
            }

            ListElement {
                name: "多策略（同时使用速度优先、费用优先、距离优先三个策略计算路径）"
                typecode: "9"
            }

            ListElement {
                name: "国道优先"
                typecode: "10"
            }

            ListElement {
                name: "省道优先"
                typecode: "11"
            }
        }
    }
}

//0：速度优先（时间），默认为0
//1：费用优先（不走收费路段最快道路）
//2：距离优先
//3：不走快速路（不走快速路，不包含高速路）
//9：多策略（同时使用速度优先、费用优先、距离优先三个策略计算路径）
//10：国道优先
//11：省道优先
